package com.rui.study.micro.oauth2.controller;

import com.rui.study.commons.model.Result;
import com.rui.study.micro.oauth2.util.StatusCode;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
@RefreshScope
public class ApiController {


    @GetMapping("/v1/hello")
    public Result<String> foo() {
        return new Result<>(StatusCode.SUCCEED, "hello world");
    }
}
